import {createApp} from 'vue'
import App from './App.vue'
import routers from "./router.js";
import {createPinia} from "pinia";
import 'element-plus/dist/index.css'; // 引入 Element Plus 样式
import 'element-plus/theme-chalk/dark/css-vars.css'
import './style.css'


createApp(App)
    .use(routers)
    .use(createPinia())
    .mount('#app');

let elementsByTagName = document.getElementsByTagName('html');
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
    elementsByTagName[0].className = 'dark';
} else {
    elementsByTagName[0].className = 'light';
}